package com.ruoyi.db.oms.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 售后对象 oms_aftersale
 *
 * @author yfy
 * @date 2020-04-25
 */

@ApiModel("售后实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class OmsAftersale extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("售后ID")
    private Long id;

    @ApiModelProperty("售后编码")
    @Excel(name = "售后编码")
    @Size(min = 0, max = 63, message = "售后编码长度不能超过63个字符")
    private String aftersaleSn;

    @ApiModelProperty("订单ID")
    @Excel(name = "订单ID")
    @NotBlank(message = "订单ID不能为空")
    private Long orderId;

    @ApiModelProperty("用户ID")
    @Excel(name = "用户ID")
    @NotBlank(message = "用户ID不能为空")
    private Long userId;

    @ApiModelProperty("售后类型（0未收货退款 1已收货(无需退货)退款 2用户退货退款）")
    @Excel(name = "售后类型", readConverterExp = "0=未收货退款,1=已收货(无需退货)退款,2=用户退货退款")
    private Integer type;

    @ApiModelProperty("退款原因")
    @Excel(name = "退款原因")
    @Size(min = 0, max = 31, message = "退款原因长度不能超过31个字符")
    private String reason;

    @ApiModelProperty("退款金额")
    @Excel(name = "退款金额")
    private BigDecimal amount;

    @ApiModelProperty("退款凭证图片链接数组")
    @Size(min = 0, max = 1023, message = "退款金额长度不能超过1023个字符")
    private String pictures;

    @ApiModelProperty("退款说明")
    @Size(min = 0, max = 511, message = "退款金额长度不能超过511个字符")
    private String comment;

    @ApiModelProperty("售后状态（0可申请 1用户已申请 2管理员审核通过 3管理员退款成功 4是管理员审核拒绝 5是用户已取消）")
    @Excel(name = "售后状态", readConverterExp = "0=可申请,1=用户已申请,2=管理员审核通过,3=管理员退款成功,4=是管理员审核拒绝,5=是用户已取消")
    private Integer status;

    @ApiModelProperty("管理员操作时间")
    private LocalDateTime handleTime;

    @ApiModelProperty("添加时间")
    @Excel(name = "添加时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime addTime;

    // @author 严方亚
    @ApiModelProperty("更新时间")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime updateTime;

    @ApiModelProperty("逻辑删除")
    private Integer deleted;
}
